package de.thw.web.model;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;

@Entity
public class Job extends AbstractModel {

	protected String Name;

	protected String Description;

	@ManyToMany
	protected List<Team> Groups;

	@OneToMany
	protected List<Permission> Permissions;

	// /////////////////////////////////////////////////////////////////////////////

	public String getName() {
		return this.Name;
	};

	public void setName(String name) {
		this.Name = name;
	};

	public String getDescription() {
		return this.Description;
	};

	public void setDescription(String text) {
		this.Description = text;
	};

	public List<Team> getGroups() {
		return this.Groups;
	};

	public void setGroups(List<Team> list) {
		this.Groups = list;
	};

	public void addGroup(Team group) {
		this.Groups.add(group);
	};

	public List<Permission> getPermissions() {
		return this.Permissions;
	};

	public void setPermissions(List<Permission> list) {
		this.Permissions = list;
	};

	public void addPermission(Permission permission) {
		this.Permissions.add(permission);
	};

};